<template>
  <el-config-provider :locale="language">
    <RouterView></RouterView
  ></el-config-provider>
</template>

<script setup lang="ts">
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

import { useLanguageStore } from '@/store/language'
import { computed } from 'vue'
const store = useLanguageStore()
const language = computed(() => {
  return store.language === 'zh-cn' ? zhCn : en
})
</script>
